package edu.java.lectures.lec15.collections.usage;

import java.util.SortedSet;
import java.util.TreeSet;

import edu.java.homework.hw09.exercises.person.Gender;
import edu.java.homework.hw09.exercises.person.Person;

public class SortedSetTest {

    public static void main(String[] args) {
	Person persona1 = new Person("Petyr", "Vasilev", "Petrov", 40,
		Gender.MALE, "Sofiq", 2);
	Person persona2 = new Person("Dimitrichka", "Pencheva", "Nikolova", 32,
		Gender.FEMALE, "Karnobat", 1);
	Person persona3 = new Person("Pencho", "Minchev", "Asenov", 65,
		Gender.MALE, "Blagoevgrad", 3);
	Person persona4 = new Person("Violeta", "Georgieva", "Deneva", 15,
		Gender.FEMALE, "Asenovgrad", 0);
	Person persona5 = new Person("Stoencho", "Borisov", "Dimitrov", 23,
		Gender.MALE, "Montana", 0);

	SortedSet<Person> sortedPersonSet = new TreeSet<Person>();
	sortedPersonSet.add(persona1);
	sortedPersonSet.add(persona2);
	sortedPersonSet.add(persona3);
	sortedPersonSet.add(persona4);
	sortedPersonSet.add(persona5);

	System.out.println(sortedPersonSet);

	SortedSet<Thing> thingSortedSet = new TreeSet<Thing>();
	thingSortedSet.add(new Thing("a"));
	thingSortedSet.add(new Thing("c"));
	thingSortedSet.add(new Thing("b"));
	System.out.println(thingSortedSet);

    }
}


